<?php

namespace App\Models;



class Banner extends ApiBaseModel
{

    protected $table = 'banner';
    protected $fillable = [
        'path',
        'url',
        'status',
        'create_by',
        'update_by',
    ];
    protected $casts = [
        'status' => 'string',
    ];

    // public function getSettingAttribute($value)
    // {
    //     return unserialize($value);
    // }
    // public function setSettingAttribute($value)
    // {
    //     $this->attributes['setting'] = serialize($value);
    // }
    // public function getCallbackUrlAttribute($value)
    // {
    //     //        return env('APP_URL')."/callback.php?c={$this->attributes['channel_code']}&id={$this->attributes['id']}";
    //     return env('APP_URL') . "/callback.php/{$this->attributes['channel_code']}/{$this->attributes['id']}";
    // }
    // public function channel_order()
    // {
    //     return $this->belongsTo(ChannelOrder::class, 'id', 'channel_id');
    // }
}
